const express = require('express')
const router = express.Router()

router.get('/get', (req, res) => {
  res.send({
    code: 200,
    success: true,
    message: '请求成功',
    data: {
      count: 10,
      str: 'get test success'
    }
  })
})

router.post('/post', (req, res) => {
  const { value } = req.body

  res.send({
    code: 200,
    success: true,
    message: '请求成功',
    data: {
      value: value,
      str: 'post test success'
    }
  })
})

module.exports = router
